home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / btest.z / btest
Encoding:
Text File  |  2002-10-03  |  3.0 KB  |  74 lines

  1. BTEST(3I)                                             Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      BBTTEESSTT, BBIITTEESSTT, BBJJTTEESSTT, BBKKTTEESSTT - Tests a bit of an integer value
  6.  
  7. SSYYNNOOPPSSIISS
  8.      BBTTEESSTT (([II==]_i,, [PPOOSS==]_p_o_s))
  9.      BBIITTEESSTT (([II==]_i,, [PPOOSS==]_p_o_s))
  10.      BBJJTTEESSTT (([II==]_i,, [PPOOSS==]_p_o_s))
  11.      BBKKTTEESSTT (([II==]_i,, [PPOOSS==]_p_o_s))
  12.  
  13. IIMMPPLLEEMMEENNTTAATTIIOONN
  14.      UNICOS, UNICOS/mk, and IRIX systems
  15.  
  16.      CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77
  17.  
  18. SSTTAANNDDAARRDDSS
  19.      Fortran
  20.  
  21.      Fortran extensions:  BBIITTEESSTT, BBJJTTEESSTT, BBKKTTEESSTT
  22.  
  23. DDEESSCCRRIIPPTTIIOONN
  24.      The BBTTEESSTT, BBIITTEESSTT, BBJJTTEESSTT, and BBKKTTEESSTT intrinsic functions test a bit
  25.      of an integer value.  They accept the following arguments:
  26.  
  27.      _i         Must be of type integer.  For BBIITTEESSTT, it must be an integer
  28.                (KIND=2) value.  For BBJJTTEESSTT, it must be an integer (KIND=4)
  29.                value.  For BBKKTTEESSTT, it must be an integer (KIND=8) value.
  30.  
  31.      _p_o_s       Must be of type integer.  For BBIITTEESSTT, it must be an integer
  32.                (KIND=2) value.  For BBJJTTEESSTT, it must be an integer (KIND=4)
  33.                value.  For BBKKTTEESSTT, it must be an integer (KIND=8) value.
  34.                It must be nonnegative and be less than BBIITT__SSIIZZEE((_i)).
  35.  
  36.      BBTTEESSTT, BBIITTEESSTT, BBJJTTEESSTT, and BBKKTTEESSTT are elemental functions.  The names
  37.      of these intrinsics cannot be passed as arguments.
  38.  
  39. RREETTUURRNN VVAALLUUEESS
  40.      BBTTEESSTT returns type default logical.  BBIITTEESSTT returns type logical
  41.      (KIND=2).  BBJJTTEESSTT returns type logical (KIND=4).  BBKKTTEESSTT returns type
  42.      logical (KIND=8).
  43.  
  44.      The result has the value TTRRUUEE if bit _p_o_s of _i has the value 1.  It has
  45.      the value FFAALLSSEE if bit _p_o_s of _i has the value 0.  The bit model
  46.      defines the interpretation of an integer value as a sequence of bits.
  47.      This model is described in the MMOODDEELLSS(3I) man page.
  48.  
  49. EEXXAAMMPPLLEESS
  50.      Example 1:  BBTTEESSTT((88,,33)) has the value TTRRUUEE.
  51.  
  52.      Example 2:  BBTTEESSTT((88__SSHHOORRTT,,33)) has the value TTRRUUEE.
  53.  
  54.      Example 3:  Assume that AA has the following value:
  55.  
  56.      | 1 2 |
  57.      | 3 4 |
  58.  
  59.      The value of BBTTEESSTT((AA,, 22)) is as follows:
  60.  
  61.      | false false |
  62.      | false  true |
  63.  
  64.      The value of BBTTEESSTT((22,, AA)) is as follows:
  65.  
  66.      | true   false |
  67.      | false  false |
  68.  
  69. SSEEEE AALLSSOO
  70.      MMOODDEELLSS(3I)
  71.  
  72.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  73.      man page.
  74.